﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Registry
{
    class Program
    {
        static void Main(string[] args)
        {
            IService service;

            ServiceRegistry.RegisterService(typeof(ServiceImplA));
            service = ServiceRegistry.GetService();
            service.DoSomething();

            ServiceRegistry.RegisterService(typeof(ServiceImplB));
            service = ServiceRegistry.GetService();
            service.DoSomething();

            Console.ReadKey();
        }
    }
}
